#include "dlg_eval.h"
#include "ui_dlg_eval.h"
#include"QDebug"
#include<QMessageBox>

dlg_eval::dlg_eval(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::dlg_eval)
{
    ui->setupUi(this);
}

dlg_eval::~dlg_eval()
{
    delete ui;
}

void dlg_eval::SetStuId(QString id)
{
    ui->lineEdit_2->setText(id);
    qDebug()<<"2:"<<id;
}

void dlg_eval::on_pushButton_clicked()
{
    StuEvalTech info;
    info.stu_id = ui->lineEdit_2->text();
    info.tech_id = ui->lineEdit->text();
    info.stu_eval = ui->comboBox->currentText();
    auto ptr = supsql::getinstance();
    ptr->AddEval(info);
    QMessageBox::information(nullptr,"信息","评价完成");
    this->hide();
}
